Skip to content

Zettelkasten support#286

Merged
pbek merged 14 commits intoqownnotes:mainfrom
luginf:zettelkasten
May 2, 2026
Merged

Zettelkasten support#286
pbek merged 14 commits intoqownnotes:mainfrom
luginf:zettelkasten

Conversation

@luginf
Copy link
Copy Markdown
Contributor

@luginf luginf commented Apr 30, 2026

here is an extension that allows to uses Zettelkasten style links and method within QownNotes. This kind of features has been requested several times cf.https://github.com/pbek/QOwnNotes/issues?q=is%3Aissue%20state%3Aclosed%20zettelkasten

It works almost like on Zettlr: you define your personal way of adding a unique ID for your Zettelkasten (by default: %Y%M%D%h%m%s which will turn into 20260430143012. My personal preference is id%Y%M%Dx%h%m%s => id20260430x143012 because it's more unlikely to be mistaken from a random date copied from elsewhere. The syntax format is ECMAscripts https://en.wikipedia.org/wiki/ECMAScript as used on Zettlr. It's a bit different from the date format used on qownnotes (https://www.qownnotes.org/editor/time-formats.html) but it shouldn't really be an issue.

@luginf
Copy link
Copy Markdown
Contributor Author

luginf commented Apr 30, 2026

(made with claude code)

@pbek
Copy link
Copy Markdown
Member

pbek commented Apr 30, 2026

Do you need zettelkasten/ZkLinkDialog.qml deployed? Then you need to add it to info.json, like

"resources": [
"markdown-it.js",
"markdown-it-deflist.js",
"markdown-it-katex.js"
],
.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new QOwnNotes scripting extension providing Zettelkasten-style IDs, link insertion, and automatic/manual repair of [[target|ID]] links to survive note renames.

Changes:

  • Introduces zettelkasten.qml with actions to insert IDs, insert links via a picker dialog, and repair stale links (on-open and full-vault scan).
  • Adds a QML modal dialog (ZkLinkDialog.qml) to filter/select notes by detected ID.
  • Adds extension metadata (info.json) and end-user documentation (README.md).

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 7 comments.

File Description
zettelkasten/zettelkasten.qml Core script: ID generation/detection, link insertion, backlink repair logic, actions/hooks
zettelkasten/ZkLinkDialog.qml Modal UI for filtering and selecting a note to insert a ZK link
zettelkasten/info.json Extension metadata (name/id/version/minAppVersion/description)
zettelkasten/README.md Usage docs: concepts, link format, actions, settings

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread zettelkasten/zettelkasten.qml
Comment thread zettelkasten/zettelkasten.qml Outdated
Comment thread zettelkasten/README.md Outdated
Comment thread zettelkasten/info.json Outdated
Comment thread zettelkasten/zettelkasten.qml
Comment thread zettelkasten/zettelkasten.qml
Comment thread zettelkasten/zettelkasten.qml Outdated
luginf and others added 2 commits April 30, 2026 23:05
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@luginf
Copy link
Copy Markdown
Contributor Author

luginf commented Apr 30, 2026

Do you need zettelkasten/ZkLinkDialog.qml deployed? Then you need to add it to info.json, like

"resources": [
"markdown-it.js",
"markdown-it-deflist.js",
"markdown-it-katex.js"
],

.

done

@pbek
Copy link
Copy Markdown
Member

pbek commented May 1, 2026

Just ping me when you want me to review again.

@luginf
Copy link
Copy Markdown
Contributor Author

luginf commented May 1, 2026

Just ping me when you want me to review again.

I suppose everything is done now. There is still this check formatting error that I can't fix, Claude can sometimes fix it but after many iterations... :/

@pbek
Copy link
Copy Markdown
Member

pbek commented May 2, 2026

In case you want to go crazy, there is a complete https://devenv.sh/ dev environment that also does linting for this project via git commit hooks, the same is used in ci...

Otherwise I'll fix the errors. :)

@pbek pbek merged commit 5dd801c into qownnotes:main May 2, 2026
1 of 2 checks passed
@pbek
Copy link
Copy Markdown
Member

pbek commented May 2, 2026

I really think you need to tell the user in the script description in info.json how to use the script. I wanted to try the script, but I have no idea what it should do and how to use it just from the description. 🤔

@pbek
Copy link
Copy Markdown
Member

pbek commented May 2, 2026

Same goes for your text snippets script. 😅 Insert and manage reusable text snippets with placeholders ($CURRENT_YEAR, $CURRENT_DATE, $UUIDâ�¦) into notes. doesn't tell the user how to use the script. Also, there is a broken character in the script description. 🤔

@luginf
Copy link
Copy Markdown
Contributor Author

luginf commented May 2, 2026

@pbek
Thank you for telling me about devenv, I'll have a look.

Same goes for your text snippets script. 😅 Insert and manage reusable text snippets with placeholders ($CURRENT_YEAR, $CURRENT_DATE, $UUIDâ�¦) into notes. doesn't tell the user how to use the script. Also, there is a broken character in the script description. 🤔

Ok, I'll do it ASAP (for this one and for the snippets) and I'll reopen a new PR for this! This is strange for the broken character, it's just , I'll replace is with 3 dots instead!

Is is better to delete those branches and create a new one for the descriptions or can I reuse them without messing everything?

@pbek
Copy link
Copy Markdown
Member

pbek commented May 2, 2026

Yes, always use the latest main branch as base.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants